@import "../../../../variables";
@import "../../../../mixins";

.summary {
  @include centered-column;
  width: fit-content;
  margin: 0 auto;
  padding: 0 20px;

  h2 {
    margin-bottom: 0;
  }

  &__chart {
    @include centered-column;
    height: 300px;

    // Remove chart tooltip flickering
    svg > g > g:last-child {
      pointer-events: none
    }
  }

  &__compliance {
    @include centered-column;
    position: absolute;

    &_hidden {
      display: none;
    }

    span {
      font-size: 45px;
    }
  }

  .legend {
    list-style: none;
    padding: 0;
    margin-top: 0;

    display: flex;

    &-item {
      margin: 0 10px;
      display: flex;
      align-items: center;

      .legend-item__icon {
        font-size: 16px;
        margin-right: 5px;
      }

      &_passed {
        .legend-item__icon {
          color: $color-success;
        }
      }
      &_failed {
        .legend-item__icon {
          color: $color-primary;
        }
      }
    }
  }
}
